package com.itheima.fallback;

import com.itheima.feign.UserFeignApi;
import com.itheima.pojo.User;
import org.springframework.stereotype.Component;

@Component//配置类
public class UserFeignApiFallBack  implements UserFeignApi {

    @Override
    public User findById(Long id) {
        User user = new User();
        user.setUserName("服务正忙，请稍后再试试");
        user.setName("UserFeignApiFallBack");
        return user;
    }
}
